home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / C / LIB / DESK / CORE / Desk / h_doc / EventMsg < prev    next >
Text File  |  1996-05-21  |  3KB  |  85 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    EventMsg.h
  12.     Author:  Copyright © 1992 Jason Williams
  13.     Version: 1.00 (16 Mar 1992)
  14.     Purpose: Augments Event() routines to provide a better way of serving
  15.              WIMP messages to a set of user handler functions
  16. */
  17.  
  18.  
  19. #ifndef __Desk_EventMsg_h
  20. #define __Desk_EventMsg_h
  21.  
  22. #ifdef __cplusplus
  23.     extern "C" {
  24. #endif
  25.  
  26. #ifndef __Desk_Event_h
  27.     #include "Desk.Event.h"
  28. #endif
  29.  
  30.  
  31. extern void Desk_EventMsg_Initialise(void);
  32. /*
  33.  * Initialises the EventMsg system ready for use. Attaches EventMsg event
  34.  * handlers to catch all incoming Wimp messages (events 17, 18).
  35.  */
  36.  
  37.  
  38. extern Desk_bool Desk_EventMsg_Claim(Desk_message_action messagetype, Desk_window_handle window,
  39.                            Desk_event_handler handler, void *reference);
  40. /*
  41.  * Much like Desk_Event_Claim.
  42.  * Pass in the type of message (message action) you wish to handle, or
  43.  * Desk_event_ANY to handle ALL messages.
  44.  * Pass in the window for which this applies (Desk_event_ANY == all windows)
  45.  * Also pass in the handler function itself (a standard Desk_event_handler)
  46.  * and your own reference.
  47.  * Specific-window handlers will have priority over general handlers when
  48.  * an incoming message is dispatched to your registered handlers.
  49.  */
  50.  
  51.  
  52. extern int Desk_EventMsg_Release(Desk_message_action messagetype, Desk_window_handle window,
  53.                             Desk_event_handler handler);
  54. /*
  55.  * Release the handler for a specific message type and specific window
  56.  * combination.
  57.  * If you pass in Desk_event_ANY for the messagetype, only non-message-specific
  58.  * handlers may be released. (c.f. Desk_EventMsg_ReleaseMessage)
  59.  * If you pass in Desk_event_ANY for the window handle, only non-window-specific
  60.  * handlers may be released. (c.f. Desk_EventMsg_ReleaseWindow)
  61.  */
  62.  
  63.  
  64. extern int Desk_EventMsg_ReleaseWindow(Desk_window_handle window);
  65. /*
  66.  * Finds and removes all message handlers that relate to the given window.
  67.  * If you pass in Desk_event_ANY as the window handle, all non-window-specific 
  68.  * handlers will be released.
  69.  */
  70.  
  71.  
  72. extern Desk_bool Desk_EventMsg_ReleaseMessage(Desk_message_action messagetype);
  73. /*
  74.  * Finds and removes all message handlers that relate to the specified 
  75.  * message type. If you pass in Desk_event_ANY as the type, all handlers that
  76.  * are not message-specific will be released.
  77.  */
  78.  
  79. #ifdef __cplusplus
  80. }
  81. #endif
  82.  
  83.  
  84. #endif
  85.